package com.qidian.mespro.util;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * @ author: 周晓轩
 * @ company 起点编程
 * @ time: 2025/9/17 - 15:26
 * @ Description:
 */
public class JSONTools {

 private static ObjectMapper objectMapper = new ObjectMapper();

 public static String obj2json(Object obj){
  try {
   return objectMapper.writeValueAsString(obj);
  } catch (JsonProcessingException e) {
   throw new RuntimeException(e);
  }
 }
}

